package com.itheima.demo02;

public class MainClass02 {
    public static void main(String[] args) {
        int num = 5;
        int mu = useMethod(num);
        System.out.println(mu);
    }

    private static int useMethod(int num) {
        if (num == 1){
            return 1;
        }else {
            return num * useMethod(num - 1);
        }
    }
}
